#include <QtWidgets>
#include <QDir>
#include <QFileInfo>

#include "HComponent.h"

class HPictureViewPanel : public HMoveableWidget
{
    Q_OBJECT
public:
    HPictureViewPanel(QWidget *parent = 0);
    ~HPictureViewPanel();

    void                        setImageUrl(QString strUrl);

protected:
    void                        paintEvent(QPaintEvent *event);

private:
    void                        initUI();
    void                        initImagesInfo(QString strImageUrl);
    void                        loadImage(QString strImageName);
    void                        checkBtnState();

private slots:
    void                        lstPreBtnClicked();
    void                        lstNextBtnClicked();
    void                        sltCloseBtnClicked();

signals:
    void                        sigPictureViewPanelClosed();

private:
    QPushButton                 *m_ppbClose;
    QPushButton                 *m_ppbPre;
    QPushButton                 *m_ppbNext;
    QLabel                      *m_plblInfo;

    QHBoxLayout                 *m_phblUp;
    QHBoxLayout                 *m_phblMid;
    QVBoxLayout                 *m_pvblMain;

    QStringList                 m_lstImageNames;
    QString                     m_strImageUrl;
    QString                     m_strCurrentImageName;
};
